<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>标题</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  </head>
  
  <body>
<br /> 列表页${user.username}
	<br />
	<br />
	<br />
	<form action="HouseServlet">
		<input type="text" name="title">标题 <input type="submit"
			value="查看">
	</form>
	<table>
		<tr>
			<th>标题</th>
			<th>描述</th>
			<th>价格</th>
			<th>时间</th>
		</tr>
		<c:forEach var="house" items="${houseList }">
			<tr>
				<td>${house.title }</td>
				<td>${house.description }</td>
				<td>${house.price }</td>
				<td><fmt:formatDate value="${house.pubdate }"
						pattern="yyyy-MM-dd" /></td>
			</tr>
		</c:forEach>
	</table>
	<p>
		${page.currentPageNo }/${page.totalPageCount }
		<a href="HouseServlet?pageIndex=1">首页</a>
		<a href="HouseServlet?pageIndex=${page.currentPageNo-1 }">上一页</a>
		<a href="HouseServlet?pageIndex=${page.currentPageNo+1 }">下一页</a>
		<a href="HouseServlet?pageIndex=${page.totalPageCount }">尾页</a>
	</p>
  </body>
</html>
